import { Injectable, Logger } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { ConfigService } from '@nestjs/config';
import { BaseService } from '@wwjCommon/base/base.service';
import { CacheService } from '@wwjCommon/cache/cache.service';
import { LoggingService } from '@wwjCommon/logging/logging.service';
import { UploadService } from '@wwjVendor/upload/upload.service';
import { PayService } from '@wwjVendor/pay/pay.service';
import { SmsService } from '@wwjVendor/sms/sms.service';
import { NoticeService } from '@wwjVendor/notice/notice.service';

@Injectable()
export class CoreOplatformService extends BaseService<any> {
  private readonly logger = new Logger(CoreOplatformService.name);

  constructor(
    @InjectRepository(Object)
    protected readonly repository: Repository<any>,
    private readonly cacheService: CacheService,
    private readonly configService: ConfigService,
    private readonly loggingService: LoggingService,
    private readonly uploadService: UploadService,
    private readonly payService: PayService,
    private readonly smsService: SmsService,
    private readonly noticeService: NoticeService,
  ) {
    super(repository);
  }

  /**
   * app
   * 对应 PHP: CoreOplatformService_core::app()
   * 逻辑类型: undefined - undefined
   */
  async app() {
    // 基于PHP真实逻辑: app
    // PHP原文: $core_wechat_service = new CoreOplatformConfigService();         $oplatform_config = $core_wechat_service->getConfig();         if (empty($oplatform_c...
const core_wechat_service = this.coreOplatformConfigService;
        const oplatform_config = core_wechat_service.getConfig(];
        if (!oplatform_config.app_id) || !oplatform_config.app_secret)) throw new BusinessException('WECHAT_OPLATFORM_NOT_EXIST');//公众号未配置

        const config = [
            app_id: oplatform_config.app_id,
            secret: oplatform_config.app_secret,
            token: oplatform_config.token,
            aes_key: oplatform_config.aes_key,// 明文模式请勿填写 EncodingAESKey
            http: [
                timeout: 5.0,
                retry: true, // 使用默认重试配置
            )
        ];
        return new Application(config);
    }

    public static function codeToSession(site_id, js_code) {
        const app = self.app(];
        const weapp_config = this.coreWeappConfigService.getWeappAuthorizationInfo(site_id);

        return app.getClient().get('sns/component/jscode2session', [
            appid: weapp_config.authorization_info.authorizer_appid,
            js_code: js_code,
            grant_type: weapp_config.authorization_info.auth_code,
            component_access_token: app.getComponentAccessToken(),
            component_appid: app.getAccount().getAppId()
        ]).toArray(false);
    }

    /**
     * 获取站点id
     * @param string app_id
     * @return int|mixed
     */
    public static function getSiteIdByAuthorizerAppid(string app_id) {
        const data = this.sysConfigService.where([ ['value', 'like', "%{app_id}%"], ['config_key', 'in', [ConfigKeyDict.WEAPP, ConfigKeyDict.WECHAT] ) )).field('site_id').findOrEmpty().toArray(];
        return data.site_id || 0;
    }

    /**
     * @param app
     * @param authorizer_appid
     * @return mixed
     */
    public static function getAuthorizerInfo(app, authorizer_appid) {
        const api = app.getClient(];

        const response = api.post('/cgi-bin/component/api_get_authorizer_info', [
            json: [
                component_appid: app.getAccount().getAppId(),
                authorizer_appid: authorizer_appid
            ]
        ]];

        return response;
    }

    /**
     * 获取草稿箱列表
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateDraftList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatedraftlist').toArray(];
    }

    /**
     * 获取模板列表(普通模板)
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatelist', [template_type: 0)).toArray(];
    }

    /**
     * 添加草稿箱到模板库(普通模板)
     * @param data
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function addToTemplate(data) {
        const app = self.app(];
        return app.getClient().post('/wxa/addtotemplate', [
            json: [
                draft_id: data.draft_id,
                template_type: 0
            )
        )).toArray(];
    }

    /**
     * 删除模板
     * @param string template_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function deleteTemplate(string template_id) {
        const app = self.app(];
        return app.getClient().post('/wxa/deletetemplate', [
            json: [
                template_id: template_id
            )
        )).toArray(];
    }

    /**
     * 上传小程序代码
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function commitWeapp(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * codeToSession
   * 对应 PHP: CoreOplatformService_core::codeToSession()
   * 逻辑类型: undefined - undefined
   */
  async codeToSession(site_id: any, js_code: any) {
    // 基于PHP真实逻辑: codeToSession
    // PHP原文: $app = self::app();         $weapp_config = (new CoreWeappConfigService())->getWeappAuthorizationInfo($site_id);          return $app->getClient()->ge...
const app = self.app(];
        const weapp_config = this.coreWeappConfigService.getWeappAuthorizationInfo(site_id);

        return app.getClient().get('sns/component/jscode2session', [
            appid: weapp_config.authorization_info.authorizer_appid,
            js_code: js_code,
            grant_type: weapp_config.authorization_info.auth_code,
            component_access_token: app.getComponentAccessToken(),
            component_appid: app.getAccount().getAppId()
        ]).toArray(false);
    }

    /**
     * 获取站点id
     * @param string app_id
     * @return int|mixed
     */
    public static function getSiteIdByAuthorizerAppid(string app_id) {
        const data = this.sysConfigService.where([ ['value', 'like', "%{app_id}%"], ['config_key', 'in', [ConfigKeyDict.WEAPP, ConfigKeyDict.WECHAT] ) )).field('site_id').findOrEmpty().toArray(];
        return data.site_id || 0;
    }

    /**
     * @param app
     * @param authorizer_appid
     * @return mixed
     */
    public static function getAuthorizerInfo(app, authorizer_appid) {
        const api = app.getClient(];

        const response = api.post('/cgi-bin/component/api_get_authorizer_info', [
            json: [
                component_appid: app.getAccount().getAppId(),
                authorizer_appid: authorizer_appid
            ]
        ]];

        return response;
    }

    /**
     * 获取草稿箱列表
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateDraftList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatedraftlist').toArray(];
    }

    /**
     * 获取模板列表(普通模板)
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatelist', [template_type: 0)).toArray(];
    }

    /**
     * 添加草稿箱到模板库(普通模板)
     * @param data
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function addToTemplate(data) {
        const app = self.app(];
        return app.getClient().post('/wxa/addtotemplate', [
            json: [
                draft_id: data.draft_id,
                template_type: 0
            )
        )).toArray(];
    }

    /**
     * 删除模板
     * @param string template_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function deleteTemplate(string template_id) {
        const app = self.app(];
        return app.getClient().post('/wxa/deletetemplate', [
            json: [
                template_id: template_id
            )
        )).toArray(];
    }

    /**
     * 上传小程序代码
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function commitWeapp(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * getSiteIdByAuthorizerAppid
   * 对应 PHP: CoreOplatformService_core::getSiteIdByAuthorizerAppid()
   * 逻辑类型: undefined - undefined
   */
  async getSiteIdByAuthorizerAppid(app_id: string) {
    // 基于PHP真实逻辑: getSiteIdByAuthorizerAppid
    // PHP原文: $data = (new SysConfig())->where([ ['value', 'like', "%{$app_id}%"], ['config_key', 'in', [ConfigKeyDict::WEAPP, ConfigKeyDict::WECHAT] ] ])->field('s...
const data = this.sysConfigService.where([ ['value', 'like', "%{app_id}%"], ['config_key', 'in', [ConfigKeyDict.WEAPP, ConfigKeyDict.WECHAT] ) )).field('site_id').findOrEmpty().toArray(];
        return data.site_id || 0;
    }

    /**
     * @param app
     * @param authorizer_appid
     * @return mixed
     */
    public static function getAuthorizerInfo(app, authorizer_appid) {
        const api = app.getClient(];

        const response = api.post('/cgi-bin/component/api_get_authorizer_info', [
            json: [
                component_appid: app.getAccount().getAppId(),
                authorizer_appid: authorizer_appid
            ]
        ]];

        return response;
    }

    /**
     * 获取草稿箱列表
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateDraftList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatedraftlist').toArray(];
    }

    /**
     * 获取模板列表(普通模板)
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatelist', [template_type: 0)).toArray(];
    }

    /**
     * 添加草稿箱到模板库(普通模板)
     * @param data
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function addToTemplate(data) {
        const app = self.app(];
        return app.getClient().post('/wxa/addtotemplate', [
            json: [
                draft_id: data.draft_id,
                template_type: 0
            )
        )).toArray(];
    }

    /**
     * 删除模板
     * @param string template_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function deleteTemplate(string template_id) {
        const app = self.app(];
        return app.getClient().post('/wxa/deletetemplate', [
            json: [
                template_id: template_id
            )
        )).toArray(];
    }

    /**
     * 上传小程序代码
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function commitWeapp(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * getAuthorizerInfo
   * 对应 PHP: CoreOplatformService_core::getAuthorizerInfo()
   * 逻辑类型: undefined - undefined
   */
  async getAuthorizerInfo(app: any, authorizer_appid: any) {
    // 基于PHP真实逻辑: getAuthorizerInfo
    // PHP原文: $api = $app->getClient();          $response = $api->post('/cgi-bin/component/api_get_authorizer_info', [             'json' => [                 "com...
const api = app.getClient(];

        const response = api.post('/cgi-bin/component/api_get_authorizer_info', [
            json: [
                component_appid: app.getAccount().getAppId(),
                authorizer_appid: authorizer_appid
            ]
        ]];

        return response;
    }

    /**
     * 获取草稿箱列表
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateDraftList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatedraftlist').toArray(];
    }

    /**
     * 获取模板列表(普通模板)
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatelist', [template_type: 0)).toArray(];
    }

    /**
     * 添加草稿箱到模板库(普通模板)
     * @param data
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function addToTemplate(data) {
        const app = self.app(];
        return app.getClient().post('/wxa/addtotemplate', [
            json: [
                draft_id: data.draft_id,
                template_type: 0
            )
        )).toArray(];
    }

    /**
     * 删除模板
     * @param string template_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function deleteTemplate(string template_id) {
        const app = self.app(];
        return app.getClient().post('/wxa/deletetemplate', [
            json: [
                template_id: template_id
            )
        )).toArray(];
    }

    /**
     * 上传小程序代码
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function commitWeapp(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * getTemplateDraftList
   * 对应 PHP: CoreOplatformService_core::getTemplateDraftList()
   * 逻辑类型: undefined - undefined
   */
  async getTemplateDraftList() {
    // 基于PHP真实逻辑: getTemplateDraftList
    // PHP原文: $app = self::app();         return $app->getClient()->get('/wxa/gettemplatedraftlist')->toArray();     }      /**      * 获取模板列表(普通模板)      * @return a...
const app = self.app(];
        return app.getClient().get('/wxa/gettemplatedraftlist').toArray(];
    }

    /**
     * 获取模板列表(普通模板)
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getTemplateList() {
        const app = self.app(];
        return app.getClient().get('/wxa/gettemplatelist', [template_type: 0)).toArray(];
    }

    /**
     * 添加草稿箱到模板库(普通模板)
     * @param data
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function addToTemplate(data) {
        const app = self.app(];
        return app.getClient().post('/wxa/addtotemplate', [
            json: [
                draft_id: data.draft_id,
                template_type: 0
            )
        )).toArray(];
    }

    /**
     * 删除模板
     * @param string template_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function deleteTemplate(string template_id) {
        const app = self.app(];
        return app.getClient().post('/wxa/deletetemplate', [
            json: [
                template_id: template_id
            )
        )).toArray(];
    }

    /**
     * 上传小程序代码
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function commitWeapp(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * getTemplateList
   * 对应 PHP: CoreOplatformService_core::getTemplateList()
   * 逻辑类型: undefined - undefined
   */
  async getTemplateList() {
    // 基于PHP真实逻辑: getTemplateList
    // PHP原文: $app = self::app();         return $app->getClient()->get('/wxa/gettemplatelist', ['template_type' => 0])->toArray();     }      /**      * 添加草稿箱到模板库(...
const app = self.app(];
        return app.getClient().get('/wxa/gettemplatelist', [template_type: 0)).toArray(];
    }

    /**
     * 添加草稿箱到模板库(普通模板)
     * @param data
     * @return array|mixed[]
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function addToTemplate(data) {
        const app = self.app(];
        return app.getClient().post('/wxa/addtotemplate', [
            json: [
                draft_id: data.draft_id,
                template_type: 0
            )
        )).toArray(];
    }

    /**
     * 删除模板
     * @param string template_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function deleteTemplate(string template_id) {
        const app = self.app(];
        return app.getClient().post('/wxa/deletetemplate', [
            json: [
                template_id: template_id
            )
        )).toArray(];
    }

    /**
     * 上传小程序代码
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function commitWeapp(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * addToTemplate
   * 对应 PHP: CoreOplatformService_core::addToTemplate()
   * 逻辑类型: undefined - undefined
   */
  async addToTemplate(data: any[]) {
    // 基于PHP真实逻辑: addToTemplate
    // PHP原文: $app = self::app();         return $app->getClient()->post('/wxa/addtotemplate', [             'json' => [                 "draft_id" => $data['draft_...
const app = self.app(];
        return app.getClient().post('/wxa/addtotemplate', [
            json: [
                draft_id: data.draft_id,
                template_type: 0
            )
        )).toArray(];
    }

    /**
     * 删除模板
     * @param string template_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function deleteTemplate(string template_id) {
        const app = self.app(];
        return app.getClient().post('/wxa/deletetemplate', [
            json: [
                template_id: template_id
            )
        )).toArray(];
    }

    /**
     * 上传小程序代码
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function commitWeapp(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * deleteTemplate
   * 对应 PHP: CoreOplatformService_core::deleteTemplate()
   * 逻辑类型: undefined - undefined
   */
  async deleteTemplate(template_id: string) {
    // 基于PHP真实逻辑: deleteTemplate
    // PHP原文: $app = self::app();         return $app->getClient()->post('/wxa/deletetemplate', [             'json' => [                 "template_id" => $template...
const app = self.app(];
        return app.getClient().post('/wxa/deletetemplate', [
            json: [
                template_id: template_id
            )
        )).toArray(];
    }

    /**
     * 上传小程序代码
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function commitWeapp(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * commitWeapp
   * 对应 PHP: CoreOplatformService_core::commitWeapp()
   * 逻辑类型: undefined - undefined
   */
  async commitWeapp(site_id: any[], json: any[]) {
    // 基于PHP真实逻辑: commitWeapp
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->post('/wxa/commit', [             'json' => $json         ])->toArray();    ...
const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/commit', [
            json: json
        )).toArray(];
    }

    /**
     * 提交审核
     * @param site_id
     * @param json
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function submitAudit(site_id, json) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * submitAudit
   * 对应 PHP: CoreOplatformService_core::submitAudit()
   * 逻辑类型: undefined - undefined
   */
  async submitAudit(site_id: any[], json: any[]) {
    // 基于PHP真实逻辑: submitAudit
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->post('/wxa/submit_audit', [             'json' => $json         ])->toArray(...
const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/submit_audit', [
            json: json
        )).toArray(];
    }

    /**
     * 发布小程序
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function releaseWeapp(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * releaseWeapp
   * 对应 PHP: CoreOplatformService_core::releaseWeapp()
   * 逻辑类型: undefined - undefined
   */
  async releaseWeapp(site_id: any) {
    // 基于PHP真实逻辑: releaseWeapp
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->post('/wxa/release', ['json' => []])->toArray();     }      /**      * 获取隐私接...
const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/release', [json: [))).toArray(];
    }

    /**
     * 获取隐私接口检测结果
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getCodePrivacyInfo(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * getCodePrivacyInfo
   * 对应 PHP: CoreOplatformService_core::getCodePrivacyInfo()
   * 逻辑类型: undefined - undefined
   */
  async getCodePrivacyInfo(site_id: any) {
    // 基于PHP真实逻辑: getCodePrivacyInfo
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->get('/wxa/security/get_code_privacy_info')->toArray();     }      /**      *...
const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/security/get_code_privacy_info').toArray(];
    }

    /**
     * 获取隐私接口
     * @param site_id
     * @return array|mixed[)
     */
    public static function getPrivacySetting(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * getPrivacySetting
   * 对应 PHP: CoreOplatformService_core::getPrivacySetting()
   * 逻辑类型: undefined - undefined
   */
  async getPrivacySetting(site_id: any) {
    // 基于PHP真实逻辑: getPrivacySetting
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->post('/cgi-bin/component/getprivacysetting', [             'json' => [      ...
const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/getprivacysetting', [
            json: [
                privacy_ver: 2
            )
        )).toArray(];
    }

    /**
     * 设置隐私协议
     * @param site_id
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setPrivacySetting(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * setPrivacySetting
   * 对应 PHP: CoreOplatformService_core::setPrivacySetting()
   * 逻辑类型: undefined - undefined
   */
  async setPrivacySetting(site_id: any, data: any) {
    // 基于PHP真实逻辑: setPrivacySetting
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->post('/cgi-bin/component/setprivacysetting', [             'json' => [      ...
const app = CoreWeappService.app(site_id);
        return app.getClient().post('/cgi-bin/component/setprivacysetting', [
            json: [
                privacy_ver: 2,
                setting_list: data.setting_list,
                owner_setting: data.owner_setting,
                sdk_privacy_info_list: data.sdk_privacy_info_list || []
            )
        )).toArray(];
    }

    /**
     * 获取服务器域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function getDomain(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * getDomain
   * 对应 PHP: CoreOplatformService_core::getDomain()
   * 逻辑类型: undefined - undefined
   */
  async getDomain(site_id: any) {
    // 基于PHP真实逻辑: getDomain
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->post('/wxa/modify_domain_directly', [             'json' => [               ...
const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'get',
            )
        )).toArray(];
    }

    /**
     * 设置域名
     * @param site_id
     * @param data
     * @return array|mixed[)
     * @throws \EasyWeChat\Kernel\BusinessExceptions\BadResponseBusinessException
     * @throws \EasyWeChat\Kernel\BusinessExceptions\InvalidArgumentBusinessException
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ClientBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\DecodingBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\RedirectionBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\ServerBusinessExceptionInterface
     * @throws \Symfony\Contracts\HttpClient\BusinessException\TransportBusinessExceptionInterface
     */
    public static function setDomain(site_id, data) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * setDomain
   * 对应 PHP: CoreOplatformService_core::setDomain()
   * 逻辑类型: undefined - undefined
   */
  async setDomain(site_id: any, data: any) {
    // 基于PHP真实逻辑: setDomain
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->post('/wxa/modify_domain_directly', [             'json' => [               ...
const app = CoreWeappService.app(site_id);
        return app.getClient().post('/wxa/modify_domain_directly', [
            json: [
                action: 'set',
                requestdomain: data.requestdomain || [],
                wsrequestdomain: data.wsrequestdomain || [],
                uploaddomain: data.uploaddomain || [],
                downloaddomain: data.downloaddomain || [],
                udpdomain: data.udpdomain || [],
                tcpdomain: data.tcpdomain || [],
            )
        )).toArray(];
    }

    /**
     * 撤回代码审核
     */
    public static function undocodeAudit(site_id) {
        const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }

  /**
   * undocodeAudit
   * 对应 PHP: CoreOplatformService_core::undocodeAudit()
   * 逻辑类型: undefined - undefined
   */
  async undocodeAudit(site_id: any) {
    // 基于PHP真实逻辑: undocodeAudit
    // PHP原文: $app = CoreWeappService::app($site_id);         return $app->getClient()->get('/wxa/undocodeaudit')->toArray();     } }...
const app = CoreWeappService.app(site_id);
        return app.getClient().get('/wxa/undocodeaudit').toArray(;
  }
  }
}
